<!doctype html>
<html>
<head>
<meta charset="<?php echo htmlspecialchars(Wekit::V('charset'), ENT_QUOTES, 'UTF-8');?>">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title><?php echo htmlspecialchars(Wind::getComponent('response')->getData('G','c','name'), ENT_QUOTES, 'UTF-8');?></title>
<link href="<?php echo htmlspecialchars(Wind::getComponent('response')->getData('G','url','css'), ENT_QUOTES, 'UTF-8');?>/admin_style.css?v<?php echo htmlspecialchars(NEXT_RELEASE, ENT_QUOTES, 'UTF-8');?>" rel="stylesheet" />
<script>
//全局变量，是Global Variables不是Gay Video喔
var GV = {
	JS_ROOT : "<?php echo htmlspecialchars(Wind::getComponent('response')->getData('G','url','res'), ENT_QUOTES, 'UTF-8');?>/js/dev/",																									//js目录
	JS_VERSION : "<?php echo htmlspecialchars(NEXT_RELEASE, ENT_QUOTES, 'UTF-8');?>",																										//js版本号
	TOKEN : '<?php echo htmlspecialchars(Wind::getComponent('windToken')->saveToken('csrf_token'), ENT_QUOTES, 'UTF-8');?>',	//token ajax全局
	REGION_CONFIG : {},
	SCHOOL_CONFIG : {},
	URL : {
		LOGIN : '<?php echo htmlspecialchars(Wind::getComponent('response')->getData('G','loginUrl'), ENT_QUOTES, 'UTF-8');?>',																													//后台登录地址
		IMAGE_RES: '<?php echo htmlspecialchars(Wind::getComponent('response')->getData('G','url','images'), ENT_QUOTES, 'UTF-8');?>',																										//图片目录
		REGION : '<?php echo Wind::getComponent('response')->getData('G', 'url', 'base'),'/','index.php?m=misc&c=webData&a=area'; ?>',					//地区
		SCHOOL : '<?php echo Wind::getComponent('response')->getData('G', 'url', 'base'),'/','index.php?m=misc&c=webData&a=school'; ?>'				//学校
	}
};
</script>
<script src="<?php echo htmlspecialchars(Wind::getComponent('response')->getData('G','url','js'), ENT_QUOTES, 'UTF-8');?>/wind.js?v<?php echo htmlspecialchars(NEXT_RELEASE, ENT_QUOTES, 'UTF-8');?>"></script>
<script src="<?php echo htmlspecialchars(Wind::getComponent('response')->getData('G','url','js'), ENT_QUOTES, 'UTF-8');?>/jquery.js?v<?php echo htmlspecialchars(NEXT_RELEASE, ENT_QUOTES, 'UTF-8');?>"></script>

</head>
<body>
<div class="wrap">
	<div class="nav">
		<ul class="cc">
			<?php  foreach($addons as $key => $value){ ?>
			<li><a href="<?php echo Wind::getComponent('response')->getData('G', 'url', 'base'),'/','admin.php?type=', rawurlencode($key),'&m=appcenter&c=style'; ?>"><?php echo htmlspecialchars($value[0], ENT_QUOTES, 'UTF-8');?></a></li>
			<?php  } ?>
			<li><a href="<?php echo Wind::getComponent('response')->getData('G', 'url', 'base'),'/','admin.php?m=appcenter&c=style&a=install'; ?>">本地安装</a></li>
			<li><a href="<?php echo Wind::getComponent('response')->getData('G', 'url', 'base'),'/','admin.php?m=appcenter&c=style&a=manage'; ?>">界面管理</a></li>
			<?php  if(Wekit::load('APPCENTER:service.srv.PwDebugApplication')->inDevMode1()){ ?>
			<li class="current"><a href="<?php echo Wind::getComponent('response')->getData('G', 'url', 'base'),'/','admin.php?m=appcenter&c=style&a=generate'; ?>">开发助手</a></li>
			<?php  } ?>
		</ul>
	</div>
	<!--应用安装-->
<div class="h_a">提示信息</div>
<div class="prompt_text">
		<ul>
			<li>该功能仅供应用开发者使用，通过创建应用可以生成一个最简单的demo。开发者可以基于这个demo继续开发。</li>
			<li>应用开发文档请参考《云平台文档中心》，有疑问请至phpwind官方论坛开发者论坛交流。</li>
			<li>在应用开发之前，请先在phpwind云平台创建应用，获取“应用标识”。</li>
		</ul>
	</div>
<div class="h_a">生成模板包</div>
<form class="J_ajaxForm" method="post" action="<?php echo Wind::getComponent('response')->getData('G', 'url', 'base'),'/','admin.php?m=appcenter&c=style&a=doGenerate'; ?>">
<div class="table_full">
	<table width="100%">
		<col class="th" />
		<col width="320" />
		<col />
		<tr>
			<th>模板名称</th>
			<td><span class="must_red">*</span>
				<input type="text" class="input length_5" name="name" value="" required>
			</td>
			<td><div class="fun_tips"></div></td>
		</tr>
		<tr>
			<th>模板标识(alias)</th>
			<td>
				<input type="text" class="input length_5" name="alias" value="" required>
			</td>
			<td><div class="fun_tips">请先至 <a href="http://open.phpwind.com" target="_blank">phpwind云平台</a> 创建应用，获取应用标识</div></td>
		</tr>
		<tr>
			<th>模板类型</th>
			<td><span class="must_red">*</span>
			<select size="1" name="style_type" class="select_5">
				<?php  foreach($support as $k => $v){ ?>
				<option value="<?php echo htmlspecialchars($k, ENT_QUOTES, 'UTF-8');?>"><?php echo htmlspecialchars($v[0], ENT_QUOTES, 'UTF-8');?></option>
				<?php  } ?>
			</select>
			<!-- <ul class="switch_list cc">
				# foreach($support as $k => $v){ #
				<li><label><input type="radio" name="style_type" value="<?php echo htmlspecialchars($k, ENT_QUOTES, 'UTF-8');?>"><span><?php echo htmlspecialchars($v[0], ENT_QUOTES, 'UTF-8');?></span></label></li>
				# } #
			</ul> -->
			</td>
			<td><div class="fun_tips"></div></td>
		</tr>
		<tr>
			<th>模板描述</th>
			<td>
				<textarea name="description" class="length_5"></textarea>
			</td>
			<td><div class="fun_tips"></div></td>
		</tr>
		<tr>
			<th>模板版本号</th>
			<td><span class="must_red">*</span>
				<input type="text" class="input length_5" name="version" value="1.0" required>
			</td>
			<td><div class="fun_tips"></div></td>
		</tr>
		<tr>
			<th>适用phpwind版本</th>
			<td><span class="must_red">*</span>
				<input type="text" class="input length_5" name="pwversion" value="<?php echo htmlspecialchars(NEXT_VERSION, ENT_QUOTES, 'UTF-8');?>" required>
			</td>
			<td><div class="fun_tips"></div></td>
		</tr>
		<tr>
			<th>作者名称</th>
			<td>
				<input type="text" class="input length_5" name="author" value="">
			</td>
			<td><div class="fun_tips"></div></td>
		</tr>
		<tr>
			<th>作者email</th>
			<td>
				<input type="text" class="input length_5" name="email" value="">
			</td>
			<td><div class="fun_tips"></div></td>
		</tr>
		<tr>
			<th>网站地址</th>
			<td>
				<input type="text" class="input length_5" name="website" value="">
			</td>
			<td><div class="fun_tips"></div></td>
		</tr>
	</table>
</div>

<div class="btn_wrap">
	<div class="btn_wrap_pd">
		<button class="btn btn_submit mr10 J_ajax_submit_btn" type="submit">提交</button>
	</div>
</div>
<input type="hidden" name="csrf_token" value="<?php echo WindSecurity::escapeHTML(Wind::getComponent('windToken')->saveToken('csrf_token')); ?>"/></form>
<script src="<?php echo htmlspecialchars(Wind::getComponent('response')->getData('G','url','js'), ENT_QUOTES, 'UTF-8');?>/pages/admin/common/common.js?v<?php echo htmlspecialchars(NEXT_RELEASE, ENT_QUOTES, 'UTF-8');?>"></script>
</div>

</body>
</html>